package com.gegewa.observer;

import java.util.ArrayList;
import java.util.List;

public abstract class Notifier {

    private List<Passenger> passengerList = new ArrayList<Passenger>();

    public void add(Passenger passenger) {
        passengerList.add(passenger);
    }

    public void notifyPassenger() {
        for (Passenger passenger : passengerList) {
            passenger.getOffTheBus();
        }
    }

}
